import 'dart:convert';

import 'package:enterprise_v6_app/app/data/entities/application/role_personnel_entity.dart';
import 'package:enterprise_v6_app/app/data/entities/common/form_value_entity.dart';
import 'package:enterprise_v6_app/app/data/entities/task/base_danger_investigation_info_entity.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/process_currency_execute_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/process_currency_execute_entity.g.dart';

/// 隐患排查流程执行实体
@JsonSerializable()
class ProcessCurrencyExecuteEntity {
  ProcessCurrencyExecuteEntity();

  factory ProcessCurrencyExecuteEntity.fromJson(Map<String, dynamic> json) => $ProcessCurrencyExecuteEntityFromJson(json);

  ///	表单结果
  List<FormValueEntity>? formValue = [];

  ///	确认隐患节点
  BaseDangerInvestigationInfoEntity? confirmDTO = BaseDangerInvestigationInfoEntity();

  ///	隐患整改
  BaseDangerInvestigationInfoEntity? liableDTO = BaseDangerInvestigationInfoEntity();

  ///	隐患验收节点
  BaseDangerInvestigationInfoEntity? acceptDTO = BaseDangerInvestigationInfoEntity();

  ///	下一个节点的执行人 有则修改，空则不管
  List<RolePersonnelEntity>? nextNodeExecutor = [];

  ///	执行节点id
  String? nodeId = '';

  ///	流程唯一编码
  String? processEncoding = '';

  ///	是否驳回
  bool? reject = false;

  /// 运行时模板id
  String? rtemplateId = '';

  Map<String, dynamic> toJson() => $ProcessCurrencyExecuteEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
